<template>
  <div>
    <h1>学生管理</h1>
    <StudentList 
        :students="data.students"
        :pagination="data.pagination"
        @show="show"></StudentList>
  </div>
 
</template>

<script lang="ts" setup>
import {getStudents} from '../../services/student';
const data = reactive({
    students:[],
    pagination:{}
});

const show = async (params) =>{
    let res =  await getStudents(params);
    data.students = res.data.rows;
    data.pagination = res.data;
}
show({});

</script>
<style>

</style>